details widget name

System layers

Chapter details

 

The base architecture of Atlas is depicted below:

GUI(Presentation) layer – this layer represents the Atlas user interface and comprises of two sub-entities :

-zk user interface – the layer is based on the zk web framework(http://www.zkoss.org). This is the configuration part of the user interface – the place where the users create their web site, define its structure, content and visualization.

-html renderers – the layer is responsible for the conversion of Atlas based data (pages, widgets, content items) to a browser compatible format (html, javascript). The transformation from java objects to a script languge is created via velocity templates.

Business layer – the layer is responsible for the communication between the GUI and the data access layer in the system. Moreover, this is the place where business logic is applied. The latter is done using bound osgi services.

Data access layer – this is the place, where the system communicates with the database. The reads and writes are performed using a combination of velocity templates(which contain sql scripts) and java classes – data access objects(DAOs) , which execute the required database statements.

Security layer – it is incorporated in all three layers mentioned above. The security layer is implemented using aspects(http://www.eclipse.org/aspectj) The latter are realized using method annotations. Following are the commonly used security method annotations:

The first two annotations are used in the business layer of the system:

@SystemSecurity - defines if a user has system rights to use the annotated method.

@Transactional - this aspect annotates that the actions in a given method are performed as a single block(if one of them fails, all of them fail).

Example method signature:

@Transactional

@SystemSecurity ( area = IContentModelSystemRights.CONTENT_MODEL_SYSTEM_RIGHTS, action = SystemAction.manage )

public void save( ILookup lookup )

{

...

}

This signature means that the method body is executed in one transaction and also that the user performing this action should have 'manage' system rights over the content model entity(user rights and content model are described in the Components section of the document).

The next two aspects are used in the DAO methods of the data access layer - wherever a database connection is created:

@DaoSecurity – the aspect denotes that the method can be called only from the business and data access layers of the system (and not the GUI layer).

@Connection - defines the settings of a connection – whether it is used to perform read-only or read/write operations.

Example method signature:

@DaoSecurity

@Connection (providerName = EDatasourceAtlasProviders.core, dsAccessType = EDatasourceAccessType.read_write, datasource = EDatasources.domain )

public void save( ILookup lookup ) throws Exception

{

...

}

This means that the method performs read/write operations and can be called from the business layer or other DAOs.

Resources layer – this is the layer, where the system's resources are kept. The main storage device is the postgres database, where all configuration data is preserved. Also, Lucene indices are used for operations, which require faster response time and accurate results, such as searching and analyzing large texts.